﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyBlog.DataEntity;

namespace MyBlog.DataAccess
{
    internal class AlbumDetailMap : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Tbl_AlbumDetail>
    {
        public AlbumDetailMap()
        {
            this.Property(e => e.Postfix)
                  .IsFixedLength();

            this.HasMany(e => e.Tbl_PicComment)
                 .WithRequired(e => e.Tbl_AlbumDetail)
                 .HasForeignKey(e => e.PicId)
                 .WillCascadeOnDelete(false);
        }
    }
}
